#!/usr/bin/python

# MokoBullAndCows

import os, sys
from gui.mainwindow import MainWindow

class StartMBAC:
    
    def startMBAC(self,arguments):
        
        # this is default config file
        # can you put this constant in a better location?   
        configFile = "/etc/fourdigits.cfg"
        
        # try to read a different config file if exists
        # the first parameter is the script name
        if len(arguments) == 2:
            sys.stdout.write(arguments[1])
            configFile = arguments[1]
            
        mainWindow = MainWindow(configFile)
        mainWindow.main()
    
    def __init__ (self, arguments):
        print(arguments)
        self.startMBAC(arguments)